home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 20 / Cream of the Crop 20 (Terry Blount) (1996).iso / compress / xpack144.zip / XPACK.DOC < prev    next >
Text File  |  1996-07-03  |  9KB  |  237 lines

  1.  
  2.      XPACK    An EXE/COM/SYS Executable file compressor (public domain)
  3.  
  4.      Copyright (c) 1995-1996 by JauMing Tseng
  5.  
  6.    WHAT IS XPACK?
  7.  
  8.      XPACK is an EXE/COM/SYS Executable file compressor. This program
  9.      compresses most DOS executable files. Compressed programs use
  10.      less disk space because they are much smaller,
  11.      yet they run EXACTLY as before.
  12.  
  13.  
  14.    SYSTEM REQUIREMENTS.
  15.  
  16.      XPACK works on any IBM-compatible machine with 192Kb of free
  17.      DOS memory.
  18.  
  19.      method 4 need extra 192Kb,
  20.      method 5 need extra 147kb for compression
  21.  
  22.      Every file compressed with XPACK can run on any IBM compatible
  23.      system: XT, AT, 80286, 80386, 80486, Pentium or Pentium Pro;
  24.      on Intel and non-Intel.
  25.  
  26.      DOS 2.0 or higher is required.
  27.  
  28.    USING XPACK.
  29.  
  30.      Enter the command:   XPACK [options] filename
  31.  
  32.        where "filename" is the name of the Executable file to be compressed.
  33.        XPACK will only work properly on Executable files, so if you do not
  34.        type a file extension, ".EXE", ".COM" or ".SYS" is assumed.
  35.        The filename can include drive and path specifications
  36.        and wildcards (* or ?).
  37.        The various "options" are explained later.
  38.  
  39.      XPACK will make an Executable file that:
  40.        (a) is smaller than the original, and
  41.        (b) works as before, without any noticeable loss of speed.
  42.  
  43.      The computer may take several seconds to do the compressing. If
  44.      you are impatient you can interrupt the process by pressing the
  45.      ESC key.
  46.  
  47.      Not every .EXE file can be compressed with XPACK.
  48.      (e.g. .EXE with internal overlay packed with option /g)
  49.      That's why this program creates backups. The original FILENAME.EXE file
  50.      is renamed to FILENAME.OLE. If anything goes wrong you can
  51.      restore the original file by entering these 2 commands at
  52.      the DOS prompt:
  53.                       COPY FILENAME.OLE FILENAME.EXE
  54.                       DEL FILENAME.OLE
  55.      (.COM and .SYS files are always packed ok.)
  56.  
  57.    OPTIONS.
  58.  
  59.      Any "options" that you use are typed after "XPACK" and
  60.      before "FILENAME".
  61.  
  62.      Options are all case-insensitive, separated by spaces, and begin
  63.      with either the hyphen ('-') or the slash ('/') character.
  64.  
  65.      Here are the details of the command line options:
  66.  
  67.         -?  This switch invokes option -h
  68.  
  69.         -h  This switch tells XPACK to display a
  70.             Help Screen to the DOS console device.
  71.  
  72.                You can use "XPACK /? > XPACK.HLP" to save it.
  73.  
  74.         -4  This switch tells XPACK to use pack method 4
  75.             best ratio
  76.  
  77.         -5  This switch tells XPACK to use pack method 5 (default)
  78.             2nd compression ratio
  79.             fastest compression
  80.             quickest extraction
  81.             smallest sfx
  82.  
  83.         -x  expand a compressed .COM or .SYS file.
  84.  
  85.         -f  This switch tells XPACK to convert the file even if
  86.             the result is bigger than the original file. (Not many
  87.             users will take advantage of this option!)
  88.  
  89.         -o  This switch tells XPACK to override the default
  90.             generation of FILENAME.OLE backup files. (Use this only
  91.             if you have already determined that XPACK compresses
  92.             the file(s) successfully.)
  93.  
  94.         -g  This tells XPACK to merge an overlay into packed file.
  95.  
  96.              (See note below concerning files that cannot be packed.)
  97.  
  98.                Without the -g option, XPACK does not try to compress
  99.                an .EXE file that contains overlays.
  100.  
  101.              The -g option may not work with every .EXE that contains
  102.              an overlay. It works well with .EXE files compiled from
  103.              text (ASCII) with TURBOTXT (an excellent program that is
  104.              supplied with the registered version of the TURBOBAT
  105.              batch file compiler) and overlay programs compiled by
  106.              TURBO/BORLAND pascal compiler.
  107.  
  108.      EXAMPLES.
  109.      ~~~~~~~~~
  110.        To compress all the .EXE files in the current directory
  111.        just type:
  112.                    XPACK *.EXE
  113.  
  114.        To compress without backup all .EXE files in C:\PROGS,
  115.        type:
  116.               XPACK /O C:\PROGS\*.EXE
  117.  
  118.        To pack all the Executable files using method 4, enter this
  119.        command:
  120.                 XPACK /4 *
  121.  
  122.        To compress BUMF.EXE (made from BUMF.TXT using TURBOTXT),
  123.        enter the command:
  124.                           XPACK -g BUMF
  125.  
  126.  
  127.      FILES THAT CAN'T BE PACKED.
  128.  
  129.        Some files can't be compressed with XPACK.
  130.  
  131.                - Programs that check the CRC of a file
  132.                - Files that store configuration data internally
  133.                - Drivers that can be loaded in a
  134.                    config.sys file (EMM386.EXE)
  135.                - Some files with "overlays" or DOS4GW overlays, etc..
  136.                    Some "overlaid" files can't be compressed because
  137.                    when you compress such a file the overlay offset
  138.                    changes and the compressed program may not find
  139.                    an overlay.
  140.  
  141.      WINDOWS AND OS/2 FILES.
  142.  
  143.        We cannot Pack Windows or OS/2 New .EXEs are because at the
  144.        ends of these files there are resources, which have to be
  145.        located there.  (e.g. the BITMAPs, Dialogue, Boxes,
  146.        Buttons, and Icons)
  147.          These resources are loaded not with the execution
  148.        of the file, but only when needed by Windows or OS/2.
  149.          Windows and OS/2 files are automatically recognized by
  150.        XPACK.
  151.  
  152.      DISTRIBUTING XPACK.
  153.  
  154.        The XPACK utility is protected by copyright, and may be
  155.        distributed only according to the following limitations:
  156.          1) NO price may be charged, other than a fee for copying
  157.             and mailing the disk.
  158.          2) The utility and documentation must be included together,
  159.             in unmodified form. The XPACK.COM, XPACK.DOC and XPACK.BG5
  160.             files must stay together.
  161.  
  162.        XPACK can be freely uploaded to any BBS, online system or
  163.        something similar, and can be freely included on any CD-ROM.
  164.  
  165.        Programs compressed with XPACK may be distributed without
  166.        royalties or licensing.
  167.  
  168.      CREDITS.
  169.  
  170.         Optimized by http://www.xs4all.nl/~feldmann
  171.  
  172.         Revised documentation (XPACK.DOC) by John Kiernan.
  173.         I thank the following people for testing and suggestions:
  174.         Fred Lu, John Kiernan, ChengChang Liu, Harald Feldmann, Jeff Gilchrist,
  175.         Henrik Haftmann, Michal Weis, Peter Hubinsky (Slovak Antivirus Center),
  176.         Cristi Bradiceanu (The DOP), Tomas Hajny, Roeland Louwe Kooijmans,
  177.         Keith Petersen, Peter Gutmann. Thank you!
  178.  
  179.         HOW DOES XPACK WORK?
  180.  
  181.           The XPACK utility works by compressing an
  182.           executable file.  The encoded program is written back to
  183.           disk under the original file name, with a relocating
  184.           decoder attached to the file.
  185.             When the executable file executes, control passes to the
  186.           relocating decoder, which relocates itself (and the
  187.           encoded data) higher in memory. It then decodes the
  188.           program into the same place it would have been loaded if
  189.           it were not encoded. The XPACKed program resets the registers
  190.           and flags to their original forms and starts the program
  191.           just as if there had never been any encoding.
  192.  
  193.             If a "CRC" check failure occurs during decoding .EXE, it will
  194.           display a message:
  195.             "This program has been damaged and cannot be run!"
  196.           and return the user to DOS.
  197.             XPACK has a security function that prevents the .EXE program
  198.           from running if it has been tampered with or accidentally
  199.           corrupted.  You can be pretty certain that your program will
  200.           come up with all the proper screens without hanging
  201.           due to unwanted modification. Your program's underlying
  202.           data will not be left in the open (to any one with a hex editor
  203.           or disassembler) and your code will be safer from others' eyes.
  204.  
  205.      HELP and SUGG